package cn.tedu.attendance.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
public class PageParam {
    //分页的数据
    @ApiModelProperty("当前页")
    private Integer currentPage = 1;
    @ApiModelProperty("每页显示条数")
    private Integer pageSize = 5;

    public Integer getBegin() {
        return (this.currentPage-1)*this.pageSize;
    }

    //高级查询
    @ApiModelProperty("员工姓名")
    private String username;
    @ApiModelProperty("部门编号")
    private Long did;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty("上班日期")
    private Date wtime;
}
